PROJECT(GAS C CXX)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR)
ENABLE_TESTING()

# Set CMake module path
SET(CMAKE_MODULE_PATH "${GAS_SOURCE_DIR}/cmake")


FIND_PACKAGE(CGAL REQUIRED)
FIND_PACKAGE(Eigen2 REQUIRED)
FIND_PACKAGE(CImg REQUIRED)

FIND_PACKAGE(libconfig REQUIRED)

FIND_PACKAGE(Doxygen REQUIRED)


# OpenMP
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS} -Wno-uninitialized")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -Wno-uninitialized")


# Include directories
INCLUDE_DIRECTORIES(
#  ${CGAL_DIR}
  ${EIGEN_INCLUDE_DIRS}
  ${UMFPACK_INCLUDE_DIRS}
  ${CIMG_INCLUDE_DIR}
  ${libconfig_INCLUDE_DIRS}
  ${GAS_SOURCE_DIR}/source
  )


# Linked in libraries
SET(DEPLIBS
  ${libconfig_LIBRARIES}
  )


IF(DOXYGEN_FOUND)
  ADD_SUBDIRECTORY(doc)
ENDIF(DOXYGEN_FOUND)

ADD_SUBDIRECTORY(examples)
#ADD_SUBDIRECTORY(test)
